package com.zjitc.config;

import com.zjitc.p1.config.JavaConfiguration2;
import com.zjitc.p1.obj.User;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/13 13:44
 * @description:
 */
@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(locations = {"classpath:spring-configuration1.xml"})
@ContextConfiguration(classes = { JavaConfiguration2.class })
public class XmlConfiguration {

  @Autowired
  private User user;

  @Test
  public void testGetTeacher() {
    Assert.assertNotNull(user.getTeacher());
  }
}
